package request

import (
	"gitee.com/cjsn/topsdk/util"
)

type TmallServicecenterWorkcardEvaluateRequest struct {
	/*
	   是否鉴定通过     */
	PassEvaluation *bool `json:"pass_evaluation" required:"true" `
	/*
	   鉴定不通过时的原因编码     */
	FailCode *int64 `json:"fail_code,omitempty" required:"false" `
	/*
	   鉴定结果图片列表     */
	PicUrlList *[]string `json:"pic_url_list,omitempty" required:"false" `
	/*
	   工单id     */
	WorkcardId *int64 `json:"workcard_id" required:"true" `
}

func (s *TmallServicecenterWorkcardEvaluateRequest) SetPassEvaluation(v bool) *TmallServicecenterWorkcardEvaluateRequest {
	s.PassEvaluation = &v
	return s
}
func (s *TmallServicecenterWorkcardEvaluateRequest) SetFailCode(v int64) *TmallServicecenterWorkcardEvaluateRequest {
	s.FailCode = &v
	return s
}
func (s *TmallServicecenterWorkcardEvaluateRequest) SetPicUrlList(v []string) *TmallServicecenterWorkcardEvaluateRequest {
	s.PicUrlList = &v
	return s
}
func (s *TmallServicecenterWorkcardEvaluateRequest) SetWorkcardId(v int64) *TmallServicecenterWorkcardEvaluateRequest {
	s.WorkcardId = &v
	return s
}

func (req *TmallServicecenterWorkcardEvaluateRequest) ToMap() map[string]interface{} {
	paramMap := make(map[string]interface{})
	if req.PassEvaluation != nil {
		paramMap["pass_evaluation"] = *req.PassEvaluation
	}
	if req.FailCode != nil {
		paramMap["fail_code"] = *req.FailCode
	}
	if req.PicUrlList != nil {
		paramMap["pic_url_list"] = util.ConvertBasicList(*req.PicUrlList)
	}
	if req.WorkcardId != nil {
		paramMap["workcard_id"] = *req.WorkcardId
	}
	return paramMap
}

func (req *TmallServicecenterWorkcardEvaluateRequest) ToFileMap() map[string]interface{} {
	fileMap := make(map[string]interface{})
	return fileMap
}
